package org.aristotle.user.service;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;

import org.aristotle.user.model.dto.PermissionDTO;
import org.aristotle.user.model.entity.Role;
import org.aristotle.user.model.entity.RolePermission;
import org.aristotle.user.model.vo.RolePermissionVO;

import java.util.List;

public interface IRolePermissionService extends IService<RolePermission> {
    Page<RolePermissionVO> queryPageList(
        Long id,
        Long roleId,
        Long permissionId,
        Integer current,
        Integer size
    );

    RolePermissionVO getById(Long id);

    Boolean removeById(Long id);

    // 根据外键删除
    Boolean removeById(
        Long RoleId
        ,Long PermissionId
    );

    List<PermissionDTO> getPermissionDTOByRoleId(Long id);

    List<Role> getRoleByPermissionId(Long id);
}
